# D:\Python1\014\homework1.py
print("***********Dwdar管理系统***********")
print("1. 用户注册")
print("2. 用户登录")
num = input("请输入数字选择操作>>>")


def tizimdw():
    print("**********用户注册**********")
    name1 = input("请输入用户名>>>")
    password1 = input("请输入密码>>>")
    password2 = input("请再次输入密码>>>")
    if password1 == password2:
        info = {}
        info['name'] = name1
        info['password'] = password1
        print(info['name'], "注册成功！")
        return info
    else:
        print('注册失败')
        exit()


def tirkelw(info):
    print("**********用户登录**********")
    name1 = input("请输入用户名>>>")
    password1 = input("请输入密码>>>")
    if info['password'] == password1 and name1 == info['name']:
        print('登录成功')
    else:
        print('账号或密码错误')


if num == "1":
    info = tizimdw()
    tirkelw(info)
else:
    print('你还没有注册')
